package top.ajun.mall.product.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import top.ajun.common.to.SkuReductionTo;
import top.ajun.common.to.SpuBoundTo;
import top.ajun.common.utils.R;

/**
 * 远程调用: mall-coupon => SpuBoundsController.
 *
 * @author AJun
 * @date 2020/12/08
 */
@FeignClient("mall-coupon")
public interface CouponFeignService {

    /**
     * 保存 Spu 的积分信息
     */
    @PostMapping("/coupon/spubounds/save")
    R saveSpuBounds(@RequestBody SpuBoundTo spuBoundTo);

    /**
     * 保存 Sku 的优惠信息
     */
    @PostMapping("/coupon/skufullreduction/saveInfo")
    R saveSkuReduction(@RequestBody SkuReductionTo skuReductionTo);

}
